-- GENERATED SPELL FOR [Gazz'uz] --


function spell0_3204(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3204', 12000, 1)
end

function spell1_3204(pUnit, Event) --@Demon Skin,Self--
pUnit:FullCastSpellOnTarget(20798,pUnit)
pUnit:RegisterEvent('Sorts_3204', 0, 1)
end

function spell2_3204(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3204', 3000, 1)
end

function Sorts_3204(pUnit, Event)
local choix_sorts_3204 = math.random(0, 2)
if choix_sorts_3204 == 0 then
pUnit:RegisterEvent('spell0_3204', 1, 1)
end
if choix_sorts_3204 == 1 then
pUnit:RegisterEvent('spell1_3204', 1, 1)
end
if choix_sorts_3204 == 2 then
pUnit:RegisterEvent('spell2_3204', 1, 1)
end
end

function mob3204_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3204', math.random(1500, 3000), 1)
end

function mob3204_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3204_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3204_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3204, 1, 'mob3204_Action')
RegisterUnitEvent(3204, 2, 'mob3204_Leave')
RegisterUnitEvent(3204, 3, 'mob3204_Kill')
RegisterUnitEvent(3204, 4, 'mob3204_Die')
